/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.sh.ndt.exam.mapper;

import com.sh.ndt.common.mapper.BaseRowMapper;
import com.sh.ndt.exam.entity.ExamStatistics;
import com.sh.ndt.exam.entity.TestHistory;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author Prashanth
 */
public class TestStatsMapper extends BaseRowMapper {

    @Override
    public Object mapRow(ResultSet rs, int i) throws SQLException {
        ExamStatistics examStat = null;
        
        examStat = new ExamStatistics();
        
        examStat.setExamId(rs.getLong("test_id"));
        examStat.setExamName(rs.getString("test_name"));
        examStat.setAttemptCount(rs.getInt("attempt_count"));
       
        return examStat;
    
    }
    
}
